﻿using System;
using System.Text;

namespace BytesAsUTF8
{
    class Program
    {
        static void Main()
        {
            Console.Write("Enter a string: ");
            string input = Console.ReadLine();
            foreach (byte b in Encoding.UTF8.GetBytes(input))
            {
                Console.Write("\\x{0:x}", b);
            }
            Console.WriteLine();
        }
    }
}
